#include<iostream>
using namespace std;
int n=0;
void count(int x,int y){
    if(x==3&&y==1)n++;
    if(x<=3&&y==0){
        count(x+1,y);
        count(x,y+1);
        count(x+1,y+1);
    }
    if(y==1&&x<=2){
        count(x+1,y-1);
        count(x+1,y);
    }
}
int main(){
    count(0,0);
    cout<<n;
    return 0;
}
